<?xml version="1.0" encoding="UTF-8" ?>
<%@page import="historymanager.model.ControllerUnit"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
		"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Startseite History Manager</title>

</head>
<body>

	<body
		style="background-image: url(Background.jpg); background-repeat: no-repeat"></body>

	<%@ page import="historymanager.servlets.ProgramInfo"%>
	<%@ page import="java.io.File"%>
	<%
		ProgramInfo programInfo = ProgramInfo.getInstance();
		int measurePointCount = programInfo.getmeasurepointCount();

		String strMeasurePointCount = String.valueOf(programInfo
				.getmeasurepointCount());
		String strTimeLastRequest = String.valueOf(programInfo
				.gettimeLastRequest());
		String databaseStatus = programInfo.getdatabaseStatus();
		String strLastRequest = programInfo.getDateLastRequest();
		String strRequestInterval = String.valueOf(programInfo
				.getRequestInterval());
		String strFreeSpace = String
				.valueOf(new File("/").getFreeSpace() / 1024 / 1024);
		String strDatabaseFreeSpace = String.valueOf(programInfo
				.getDatabasefreeSpace());
		String strDatabaseDataSpace = String.valueOf(programInfo
				.getDatabaseDataSpace());
		String strDatabaseIndexSpace = String.valueOf(programInfo
				.getDatabaseIndexSpace());
		String strDatabaseCompleteSpace = String.valueOf(programInfo
				.getDatabaseCompleteSpace());
		String strDatabaseMinFreeSpace = String.valueOf(programInfo
				.getDatabaseMinFreeSpace());
	%>


	<h1>Herzlich Willkommen beim Saia-History-Manager</h1>

	<p>
		<b>Anzahl der aktiven Messpunkte: </b>
		<%
			out.print(strMeasurePointCount);
		%>
	</p>
	<p></p>
	<p>
		<b>Server-Status: </b>
		<%
			out.print(databaseStatus);
		%>
	</p>
	<p></p>
	<p>
		<b>Dauer des letzten Datenbabrufs: </b>
		<%
			out.print(strTimeLastRequest);
		%>
		Sekunden
	</p>
	<p></p>
	<p>
		<b>Uhrzeit des letzten Datenabrufs: </b>
		<%
			out.print(strLastRequest);
		%>
	</p>
	<p></p>
	<p>
		<b>Intervallzeit Datenabruf: </b>
		<%
			out.print(strRequestInterval);
		%>
		Minuten
	</p>
	<p>
		<h2>Speichermanagement Datenbank</h2>
		<b>Minimaler freier Datenbank-Speicher: </b>
		<%
			out.print(strDatabaseMinFreeSpace);
		%>
		MByte

		<p></p>
		<b>Freier Festplattenspeicher: </b>
		<%
			out.print(strFreeSpace);
		%>
		MByte

		<p></p>
		<b>Freier Datenbank-Speicher: </b>
		<%
			out.print(strDatabaseFreeSpace);
		%>
		MByte
		<p></p>
		<b>Belegter Speicher für Daten:</b>
		<%
			out.print(strDatabaseDataSpace);
		%>
		MByte
		<p></p>
		<b>Belegter Speicher für Index-Daten:</b>
		<%
			out.print(strDatabaseIndexSpace);
		%>
		MByte
		<p></p>
		<b>Komplette Größe der Datenbank</b>
		<%
			out.print(strDatabaseCompleteSpace);
		%>
		MByte


	</p>


	<form action="trenddata.jsp">
		<input type="submit" value=" Weiter zur Trendseite ">
	</form>
	<br/><br/>
	<button onclick="window.location.href='DataProvider?mode=showlogfiles'">Anzeige
		Logfiles</button>
</body>
</html>

